import crypto from 'crypto'

const RequestHelper = {
    hmcShA256(data, key) {
        return crypto.createHmac('sha256', key).update(data).digest('hex')
    },
    hmcShA256Def(data, key) {
        return crypto.createHmac('sha256', key).update(data).digest()
    },
    sha256(data) {
        return crypto.createHash('sha256').update(data).digest('hex')
    }
}

export default RequestHelper
